
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 31 21:52:57 2024

@author: YANCL
"""

import cv2
# import numpy as np
a = cv2.imread("photo\\lena.png")
b = cv2.imread("photo\\Barbara.bmp")

result = cv2.addWeighted(a, 0.67, b, 0.56, 0)

cv2.imshow("lena", a)
cv2.imshow("Barbara", b)
cv2.imshow("result", result)

cv2.waitKey()
cv2.destroyAllWindows()



# =============================================================================
# # created by Huang Lu
# # 27/08/2016 17:05:45 
# # Department of EE, Tsinghua Univ.
# 
# import cv2
# import numpy as np
# 
# cap = cv2.VideoCapture(0)
# while(1):
#     # get a frame
#     ret, frame = cap.read()
#     # show a frame
#     cv2.imshow("capture", frame)
#     if cv2.waitKey(1) & 0xFF == ord('q'):
#         break
# cap.release()
# cv2.destroyAllWindows() 
# =============================================================================
